﻿using System;
using System.Collections.Generic;
using System.Text;
using Jint;
namespace Ls.Utils
{
    public static class JintHelper
    {
        public static object Excute(string str) {
            try
            {
                var engine = new Engine();
                return engine.Execute(str).GetCompletionValue().ToObject();
            }
            catch (Exception ex)
            {

                 return null;
            }
          
        }
    }
}
